
#define PRINT_ERROR(message) printf("Error: %s\n",message);




#define EL_NOP 0
#define EL_READ 2
#define EL_WRITE 3


struct Task;

struct Task* create_task ( int ( *handler )( struct Task* ), int max_events );
void register_request( struct Task* tp, int index, int sd, int operation );
void deregister_request( struct Task* tp, int index );
int request_is_ready( struct Task* tp, int index );
void delete_task( struct Task* tp );
int is_zombie( struct Task* tp );
void* get_task_data( struct Task* tp );
void set_task_data( struct Task* tp, void* data_pointer );

void event_loop();
